import ray

ray.init(address='ray://192.168.10.98:10001')


# Define the square task.
@ray.remote
def square(x):
    return x * x


# Launch four parallel square tasks.
futures = [square.remote(i) for i in range(4)]

print(futures)

# Retrieve results.
print(ray.get(futures))
# -> [0, 1, 4, 9]
